import service from ".";
const repairApi={
    insert(repair){
        return service.post('/admin/repair', repair);
    },
    delete(rid){
        return service.delete(`/admin/repair/${rid}`);
    },
    update(repair){
        return service.put('/admin/repair', repair);
    },
    selectByPage(pageNum, oname){
        return service.get('/admin/repair',{
            params:{
                pageNum,
                oname
            }
        });
    },
    selectByPageByOid(pageNum, oid){
        return service.get('/admin/repair/selectByPageByOid',{
            params:{
                pageNum,
                oid
            }
        });
    },
    selectByPageByPid(pageNum, pid){
        return service.get('/admin/repair/selectByPageByPid',{
            params:{
                pageNum,
                pid
            }
        });
    },
    selectByRid(rid){
        return service.get(`/admin/repair/select/${rid}`);
    },
    allRepair(rid){
        return service.get(`/admin/repair/allRepair/${rid}`);
    },
    insertRidAndPid(rid, pids){
        return service.post('/admin/repair/ridAndPid', {rid, pids});
    }
};
export default repairApi;